/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.vng.zing.survey.server;

import com.vng.zing.survey.memcached.CacheFactory;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

/**
 *
 * @author namhh
 */
public class ServiceDaemon {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        // TODO code application logic here
        String properties = System.getProperty("log4j.configuration");
        PropertyConfigurator.configure(properties);
        CacheFactory.initalize();
        WebServer webserver = new WebServer();
        try {
          
            webserver.start();

        } catch (Throwable e) {
            Logger.getLogger(ServiceDaemon.class).error(e.toString());
            System.exit(3);
        }
    }
}
